import { z } from "zod";
import { UserDto } from "../dto";
import { DtoOmitType, DtoPickType, classDto2Zod } from "src/utils";
import { ApiProp } from 'src/decorator/swagger';

/** 用户新增 */
export class UserAddDto extends DtoPickType(UserDto, [
  'email', 'psw'
]) {
  @ApiProp({ desc: '密码凭证(aes加密后的)' })
  psw!: string

  @ApiProp({ desc: "图形验证码" })
  verifyCode!: string

  @ApiProp({ desc: '邀请码' })
  inviteCode!: string
};

/** 用户新增 */
export const UserAddZod = classDto2Zod(UserAddDto);

/** 用户编辑 */
export class UserEditDto extends UserDto {
  
};
/** 用户编辑 */
export const UserEditZod = classDto2Zod(UserEditDto);